/*
加载更多的ajax组件
{"?r=ajax/mes_more?num=",10,5,"mes_model"}
传入 url,n(每次要加载几条),class(评论模块的模板类)
默认 json格式传输，

*/
var mes_ajax=(function(){
	var _default={
		"url":"?r=ajax/mes_more&id=",
		"load_num":5,
		"cur_num":0,
		"class_mes_model":"mes_model",
		"obj_id":1,
		"lost_find":1	// 1为lost，2为find
	};
	var ajax_success=function(data){
		// data=[["time","content"],["time","content"]...]
		console.log(data);
		/*data.forEach(function(par){
			console.log(this);
		})*/
	};
	var _load=function(obj){
		for(var i in _default){
			obj[i]=obj[i]?obj[i]:_default[i];
		}
		$.ajax({
			url:obj.url+obj.obj_id+'',
			method:"post",
			dataType:"json",
			data:{
				"load_num":obj.load_num,
				"cur_num":obj.cur_num,
				"lost_find":obj.lost_find
			},
			success:function(data){
				ajax_success(data);
			}
		})
	}
	return _load;
})();